Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods returning just the deserializer #102

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

elrafoon
Copy link
Contributor

Hello,

please accept this pull request, it allow user to use seeded deserializers, like this:

let des = AuthListDeserializer {
    auth_entry_visitor: Some(|e: AuthListEntry| println!("{e:?}")),
};

let file_in = std::fs::OpenOptions::new().read(true).open(pth)?;
let mut scratch = [0u8; 16];
let auth_list = des.deserialize(&mut ciborium::de::deserializer_from_reader_with_buffer(file_in, &mut scratch))?;

@elrafoon elrafoon requested a review from a team as a code owner February 13, 2024 16:54
@elrafoon elrafoon requested a review from haraldh February 13, 2024 16:54
@rjzak rjzak force-pushed the deserializer_alt1 branch from 534781a to 9dd9e7c Compare February 16, 2024 23:39
- fn deserializer_from_reader_with_buffer()
- fn deserializer_from_reader_with_buffer_and_recursion_limit()

Signed-off-by: Stanislav Ravas <[email protected]>
@rjzak rjzak force-pushed the deserializer_alt1 branch from 9dd9e7c to 62ba0bf Compare February 17, 2024 00:21
@rjzak
Copy link
Member

rjzak commented Feb 17, 2024

@elrafoon please run cargo fmt, otherwise, looks good to me.

@elrafoon
Copy link
Contributor Author

I ran cargo fmt --all, several times, it did nothing. Also cargo fmt --check passed.

Don't know what's wrong.

@rjzak rjzak merged commit c19bf22 into enarx:main Feb 17, 2024
45 of 53 checks passed
@elrafoon
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants